<template>
    <div class="bookdetail">
        <ul class="list-group">
            <li class="list-group-item">编号：{{bookdetail.id}}</li>
            <li class="list-group-item">书名：{{bookdetail.name}}</li>
            <li class="list-group-item">价格：{{bookdetail.price}}</li>
            <li class="list-group-item">作者：{{bookdetail.author}}</li>
            <li class="list-group-item">简介：{{bookdetail.desc}}</li>
        </ul>
    </div>
</template>

<script>
import { mapState, mapGetters,mapMutations,mapActions } from 'vuex'
export default {
    data(){
        return{
        }
    },
    mounted(){
        this.get_bookdetail({id:this.$route.query.id});
    },
    methods:{
        ...mapActions('book', ['get_bookdetail']),
    },
    computed:{
        ...mapGetters('book', ['bookdetail'])
    }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
.bookdetail
{
    width:100%;
}
</style>
